package com.bawei.exam57.adpater

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

class VpAdpater(fragmentActivity: FragmentActivity,list: MutableList<Fragment>) : FragmentStateAdapter(fragmentActivity) {
//    var list = ArrayList<Fragment>()
    var list1 = list
    override fun getItemCount(): Int {
        return list1.size
    }

    override fun createFragment(position: Int): Fragment {
        return list1[position]
    }
}